<template>
  <a-modal title="审批" :width="600" :visible="visible" @cancel="handleClose">
    <template slot="footer">
      <div :style="{ textAlign: 'right' }">
        <a-button key="submit" type="primary" @click="handleAudit(2)"> 通过 </a-button>
        <a-button key="submit" type="primary" @click="handleAudit(3)"> 驳回 </a-button>
        <a-button key="back" @click="handleCancel">关闭</a-button>
      </div>
    </template>
    <a-textarea v-model="operateOpinion" rows="4" placeholder="请输入审批意见" />
  </a-modal>
</template>

<script>
import '@/assets/less/TableExpand.less'
import { getAction } from '@/api/manage'
export default {
  name: 'AuditModal',
  components: {},
  props: {
    module: {},
  },
  data() {
    return {
      description: '审批',
      visible: false,
      entryId: '',
      operateOpinion: '',
      loading: false,
    }
  },
  created() {
    this.queryParam.id = this.projectId
    this.getSuperFieldList()
  },
  computed: {
    formDisabled() {
      return this.disabled
    },
  },
  methods: {
    show(id) {
      this.visible = true
      this.entryId = id
    },
    handleCancel() {
      this.visible = false
    },
    handleAudit(status) {
      var that = this
      that.$emit('ok', { operateResult: status, operateOpinion: that.operateOpinion, entryId: that.entryId })
      that.operateOpinion = ''
      that.visible = false
    },
  },
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>